#ifndef BASE_PLACE_BASE_H
#define BASE_PLACE_BASE_H

#include"./public.h"
#include"./tool_base.h"
namespace monopoly{
class Place{
public:
    Place() = default;
    Place(const Place& place) = default;
    Place(uint8_t pos,Type type):position(pos),type(type){};
    ~Place() = default;

    friend class Tool;

    uint8_t getPosition() const { return this->position; }
    Color getColor() const { return this->color; }
    Tool* getTool() const { return this->tool; }
    void setTool(Tool& tool_) {
        tool = &tool_;
        this->is_empty = false;
    }
    Type getType() const { return this->type; }
    bool IsEmpty() const { return this->is_empty;}
    void SetEmpty(){
        this->tool = nullptr;
        this->is_empty=true;
    }
protected:
    bool belong_to_bank = true;
    bool is_empty = true;
    uint8_t position;
    Color color; 
    Tool* tool;
    Type type;
};
}

#endif// BASE_PLAYER_BASE_H_